package com.autohammal.save;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import com.autohammal.monitor.SchedulerMonitor;

public class MonitorCache {
	private Map<String, SchedulerMonitor> monitorCache = Collections
			.synchronizedMap(new HashMap<String, SchedulerMonitor>());
	
	private MonitorCache(){}
	
	public void regiestMonitor(SchedulerMonitor monitor){
		if(!monitorCache.containsKey(monitor.getMonitorName())){
			monitorCache.put(monitor.getMonitorName(), monitor);
		}
	}
}
